package wnhz.com.business.groupshop.bean;

/**
 * 登录类型
 * Created by yanjunhui
 * on 2016/10/8.
 * email:303767416@qq.com
 */
public enum LoginType {

    Platform("Platform"), WeChat("WeChat"), QQ("QQ"), WeiBo("WeiBo"), Guest("Guest");

    public String keyStr;

    LoginType(String keyStr) {
        this.keyStr = keyStr;
    }

    public static LoginType getLoginType(String key) {
        if (key.equals(LoginType.Platform.keyStr)) {
            return LoginType.Platform;
        } else if (key.equals(LoginType.WeChat.keyStr)) {
            return LoginType.WeChat;
        } else if (key.equals(LoginType.QQ.keyStr)) {
            return LoginType.QQ;
        } else if (key.equals(LoginType.WeiBo.keyStr)) {
            return LoginType.WeiBo;
        }
        return LoginType.Guest;
    }
}
